package com.neuedu.helloworld.config;

import com.neuedu.helloworld.conver.String2DateConvert;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
import org.springframework.format.FormatterRegistry;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.Date;
import java.util.List;

//@Configuration
//public class Appconfig implements WebMvcConfigurer {
//
//    @Override
//    public void addFormatters(FormatterRegistry registry) {
//        registry.addConverter(new String2DateConvert());
//    }
//}

@Configuration
public class Appconfig  {



    @Bean
    Converter<String, Date> string2Date(){
        return new String2DateConvert();
    }




}
